// 自定义Vue插件
import PageTools from '../components/PageTools'
import UploadExcel from '../components/UploadExcel/index.vue'
import moment from 'moment'
import ImageUpload from '../components/ImageUpLoad/index.vue'

export default {
  install (Vue) {
    // 配置全局组件
    Vue.component(PageTools.name, PageTools)
    Vue.component(UploadExcel.name, UploadExcel)
    Vue.component('ImageUpload', ImageUpload) // 注册导入上传组件
    Vue.filter('formatDate', (value) => {
      if (!value) return '暂无'
      return moment(value).format('yyyy-MM-DD')
    })
  }

}
